package org.shangrila.wfm.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the WFM_PROCESS database table.
 * 
 */
@Entity
@Table(name="WFM_PROCESS")
@NamedQuery(name="WfmProcess.findAll", query="SELECT w FROM WfmProcess w")
public class WfmProcess implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String content;

	@Column(name="CREATE_TIME")
	private String createTime;

	private String creator;

	@Column(name="DISPLAY_NAME")
	private String displayName;

	@Column(name="EXPIRE_TIME")
	private String expireTime;

	@Column(name="INSTANCE_URL")
	private String instanceUrl;

	private String name;

	private String noclass;

	@Column(name="\"STATE\"")
	private int state;

	@Column(name="\"TYPE\"")
	private int type;

	@Column(name="\"VERSION\"")
	private int version;

	//bi-directional many-to-one association to WfmNode
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmNode> wfmNodes;

	//bi-directional many-to-one association to WfmService
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmService> wfmServices;

	//bi-directional many-to-one association to WfmServiceLog
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmServiceLog> wfmServiceLogs;

	//bi-directional many-to-one association to WfmTask
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmTask> wfmTasks;

	//bi-directional many-to-one association to WfmTaskLog
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmTaskLog> wfmTaskLogs;

	//bi-directional many-to-one association to WfmTransition
	@OneToMany(mappedBy="wfmProcess")
	private List<WfmTransition> wfmTransitions;

	public WfmProcess() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getDisplayName() {
		return this.displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getExpireTime() {
		return this.expireTime;
	}

	public void setExpireTime(String expireTime) {
		this.expireTime = expireTime;
	}

	public String getInstanceUrl() {
		return this.instanceUrl;
	}

	public void setInstanceUrl(String instanceUrl) {
		this.instanceUrl = instanceUrl;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNoclass() {
		return this.noclass;
	}

	public void setNoclass(String noclass) {
		this.noclass = noclass;
	}

	public int getState() {
		return this.state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getType() {
		return this.type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public List<WfmNode> getWfmNodes() {
		return this.wfmNodes;
	}

	public void setWfmNodes(List<WfmNode> wfmNodes) {
		this.wfmNodes = wfmNodes;
	}

	public WfmNode addWfmNode(WfmNode wfmNode) {
		getWfmNodes().add(wfmNode);
		wfmNode.setWfmProcess(this);

		return wfmNode;
	}

	public WfmNode removeWfmNode(WfmNode wfmNode) {
		getWfmNodes().remove(wfmNode);
		wfmNode.setWfmProcess(null);

		return wfmNode;
	}

	public List<WfmService> getWfmServices() {
		return this.wfmServices;
	}

	public void setWfmServices(List<WfmService> wfmServices) {
		this.wfmServices = wfmServices;
	}

	public WfmService addWfmService(WfmService wfmService) {
		getWfmServices().add(wfmService);
		wfmService.setWfmProcess(this);

		return wfmService;
	}

	public WfmService removeWfmService(WfmService wfmService) {
		getWfmServices().remove(wfmService);
		wfmService.setWfmProcess(null);

		return wfmService;
	}

	public List<WfmServiceLog> getWfmServiceLogs() {
		return this.wfmServiceLogs;
	}

	public void setWfmServiceLogs(List<WfmServiceLog> wfmServiceLogs) {
		this.wfmServiceLogs = wfmServiceLogs;
	}

	public WfmServiceLog addWfmServiceLog(WfmServiceLog wfmServiceLog) {
		getWfmServiceLogs().add(wfmServiceLog);
		wfmServiceLog.setWfmProcess(this);

		return wfmServiceLog;
	}

	public WfmServiceLog removeWfmServiceLog(WfmServiceLog wfmServiceLog) {
		getWfmServiceLogs().remove(wfmServiceLog);
		wfmServiceLog.setWfmProcess(null);

		return wfmServiceLog;
	}

	public List<WfmTask> getWfmTasks() {
		return this.wfmTasks;
	}

	public void setWfmTasks(List<WfmTask> wfmTasks) {
		this.wfmTasks = wfmTasks;
	}

	public WfmTask addWfmTask(WfmTask wfmTask) {
		getWfmTasks().add(wfmTask);
		wfmTask.setWfmProcess(this);

		return wfmTask;
	}

	public WfmTask removeWfmTask(WfmTask wfmTask) {
		getWfmTasks().remove(wfmTask);
		wfmTask.setWfmProcess(null);

		return wfmTask;
	}

	public List<WfmTaskLog> getWfmTaskLogs() {
		return this.wfmTaskLogs;
	}

	public void setWfmTaskLogs(List<WfmTaskLog> wfmTaskLogs) {
		this.wfmTaskLogs = wfmTaskLogs;
	}

	public WfmTaskLog addWfmTaskLog(WfmTaskLog wfmTaskLog) {
		getWfmTaskLogs().add(wfmTaskLog);
		wfmTaskLog.setWfmProcess(this);

		return wfmTaskLog;
	}

	public WfmTaskLog removeWfmTaskLog(WfmTaskLog wfmTaskLog) {
		getWfmTaskLogs().remove(wfmTaskLog);
		wfmTaskLog.setWfmProcess(null);

		return wfmTaskLog;
	}

	public List<WfmTransition> getWfmTransitions() {
		return this.wfmTransitions;
	}

	public void setWfmTransitions(List<WfmTransition> wfmTransitions) {
		this.wfmTransitions = wfmTransitions;
	}

	public WfmTransition addWfmTransition(WfmTransition wfmTransition) {
		getWfmTransitions().add(wfmTransition);
		wfmTransition.setWfmProcess(this);

		return wfmTransition;
	}

	public WfmTransition removeWfmTransition(WfmTransition wfmTransition) {
		getWfmTransitions().remove(wfmTransition);
		wfmTransition.setWfmProcess(null);

		return wfmTransition;
	}

}